using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class vt_CustBalMap : EntityTypeConfiguration<vt_CustBal>
    {
        public vt_CustBalMap()
        {
            // Primary Key
            this.HasKey(t => t.total);

            // Properties
            this.Property(t => t.custid)
                .HasMaxLength(6);

            // Table & Column Mappings
            this.ToTable("vt_CustBal");
            this.Property(t => t.custid).HasColumnName("custid");
            this.Property(t => t.doctype).HasColumnName("doctype");
            this.Property(t => t.total).HasColumnName("total");
        }
    }
}
